package com.ruibang.glass.quality.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 品质联络单信息
 * </p>
 *
 * @author wujie
 * @since 2023-11-30
 */

@ApiModel(value ="品质联络单信息")
@TableName("g_quality_contact")
@Data
public class QualityContact implements Serializable {

    @ApiModelProperty(value = "联络单id")
    @TableId(value = "contact_id", type = IdType.ASSIGN_ID)
    private String contactId;
    @ApiModelProperty(value = "发行编号")
    private String issueCode;
    @ApiModelProperty(value = "发行部门")
    private String deptId;
    @ApiModelProperty(value = "发行人")
    private String userId;
    @ApiModelProperty(value = "发行时间")
    private LocalDateTime issueTime;
    @ApiModelProperty(value = "联络事项")
    private String contactItem;

    @ApiModelProperty(value = "接收人")
    private String receiveUser;

    @ApiModelProperty(value = "接收部门")
    private String receiveDeptId;

    @ApiModelProperty(value = "接收时间")
    private LocalDateTime receiveTime;

    @ApiModelProperty(value = "原因分析")
    private String reason;

    @ApiModelProperty(value = "措施")
    private String measure;

    @ApiModelProperty(value = "防再发措施")
    private String preventMeasure;

    @ApiModelProperty(value = "效果确认")
    private String effectAffirm;

    @ApiModelProperty(value = "确认人")
    private String affirmUser;

    @ApiModelProperty(value = "确认时间")
    private LocalDateTime affirmTime;

    @ApiModelProperty(value = "审批意见")
    private String approveOpinion;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "关联图片Id列表")
    @TableField(exist = false)
    private List<String> fileIds;

    @ApiModelProperty(value = "编辑时删除图片Id列表")
    @TableField(exist = false)
    private List<String> deleteFileIds;

    @ApiModelProperty(value = "流程业务Id")
    @TableField(exist = false)
    private String menuId;

    @ApiModelProperty(value = "发行部门名称")
    @TableField(exist = false)
    private String deptName;

    @ApiModelProperty(value = "接收部门名称")
    @TableField(exist = false)
    private String receiveDeptName;

    @ApiModelProperty(value = "发行人用户名称")
    @TableField(exist = false)
    private String userName;

    @ApiModelProperty(value = "接收人用户名称")
    @TableField(exist = false)
    private String receiveUserName;

    @ApiModelProperty(value = "确认人用户名称")
    @TableField(exist = false)
    private String affirmUserName;

    @ApiModelProperty(value = "流程Id")
    @TableField(exist = false)
    private String processId;

    @ApiModelProperty(value = "状态")
    @TableField(exist = false)
    private String status;

    @ApiModelProperty(value = "审批状态")
    private String approveStatus;

    @ApiModelProperty(value = "审批节点")
    @TableField(exist = false)
    private String nodeName;

    @ApiModelProperty(value = "审批人")
    @TableField(exist = false)
    private String approveUserName;

    @ApiModelProperty(value = "审批人Id")
    @TableField(exist = false)
    private String approveUserId;

    @ApiModelProperty(value = "最新流程定义Id")
    @TableField(exist = false)
    private String processDefinitionId;

    @ApiModelProperty(value = "节点代码")
    @TableField(exist = false)
    private List<String> processNodes;
}
